package com.hui.account.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.hui.account.R;
import com.hui.account.activity.BackUpActivity;
import com.hui.account.utils.ButtonUtils;

/**
 * 设置
 */
public class SettingActivity extends AppCompatActivity implements View.OnClickListener {

    Button backBtn;

    LinearLayout backUpLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);

        // 1、设置屏幕顶部字体颜色
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        // 2、初始化页面
        initView();
    }

    /**
     * 初始化页面
     */
    private void initView() {
        backBtn = findViewById(R.id.setting_back);
        backUpLayout = findViewById(R.id.setting_ll_1);

        backUpLayout.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.setting_back:
                finish();
                break;
            case R.id.setting_ll_1:
                if (!ButtonUtils.isFastDoubleClick())
                    startActivity(new Intent(this, BackUpActivity.class));

                break;
        }
    }
}